﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using iShoppingBUS;

namespace iShopping.Member.UserControl
{
    public partial class MenuTaiKhoan : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string maTaiKhoan = Request.QueryString["profile"].ToString();

            if (IsPostBack == false)
            {
                TaiKhoanBUS taiKhoanBus = new TaiKhoanBUS();
                ThongTinTaiKhoanBUS thongTinTaiKhoanBus = new ThongTinTaiKhoanBUS();

                DataTable dt = taiKhoanBus.LoaiTaiKhoan(maTaiKhoan);
                string images = dt.Rows[0]["Avatar"].ToString().Trim();
                if (images == "")
                {
                    dt.Rows[0]["Avatar"] = "~/images/user.png";
                }
                FormView1.DataSource = dt;
                FormView1.DataBind();

                FormView2.DataSource = dt;
                FormView2.DataBind();
            }
        }
    }
}